// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.

import "babel-polyfill";
import Vue from 'vue'
import App from './App'
import router from './router'
import VueResource from 'vue-resource'
import iView from 'iview';
import common from './common.js';
import './theme/index.less';
import axios from '../node_modules/axios';
var qs = require('qs');
axios.defaults.transformRequest = [function(data) {
  return qs.stringify(data)
}];
axios.defaults.headers.post['Content-Type']='application/x-www-form-urlencoded;charset=UTF-8';
Vue.prototype.$http = axios;
Vue.config.productionTip = false
// Vue.use(VueResource)
// Vue.http.options.emulateJSON = true;  //http请求设置
// Vue.http.options.headers = {
//   'Content-Type': 'application/x-www-form-urlencoded;charset=UTF-8' //http请求头设置form表单提交
// };
Vue.use(iView);
Vue.use(common);
/* eslint-disable no-new */
new Vue({
  el: '#app',
  router,
  components: { App },
  template: '<App/>'
})
